<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $this->config->item('charset');?>">
        <title>更改分类</title>
        <link rel="stylesheet" type="text/css" href="<?php echo base_url();?>public/css/base.css">
        <script type="text/javascript">
            function CheckSubmit()
            {

                if(document.getElementById("sortname").value == "") {
                    alert("分类名称不能为空");
                    return false;
                }

                return true;

            }
        </script>
    </head>
    <body background='<?php echo base_url();?>public/images/allbg.gif' leftmargin="8" topmargin='8'>
        <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#DFF9AA">
            <tr> 
                <td height="28" style="border:1px solid #DADADA" background='<?php echo base_url();?>public/images/wbg.gif'>
                    &nbsp;<b>◇<a href='catalog_main.php'>分类管理</a> &gt;&gt; 更改分类</b>
                </td>
            </tr>
            <tr> 
                <td width="100%" height="80" style="padding-top:5px" bgcolor='#ffffff'>
                    <form name='myform' method='POST' onSubmit='return CheckSubmit();' action='<?php echo site_url("admin/sort/sort_save"); ?>'>
                        <input type='hidden' name='dopost' value='modify'>
                        <input type='hidden' name='id' value='<?php echo $model->id;?>'>
						  <input type='hidden' name='pid' value='<?php echo $p_model->id;?>'>
                        <table width='100%'  border='0' cellpadding='3' cellspacing='1' bgcolor='#DADADA'>
                            <tr bgcolor='#DADADA'>
                                <td colspan='2' background='<?php echo base_url();?>public/images/wbg.gif' height='26'><font color='#666600'><b></b></font></td>
                            </tr>
                            <tr bgcolor='#FFFFFF'>
                                <td width='25%'>父分类：</td>
                                <td width='75%'>
								<!--
                                    <select name='movetype'>
                                        <option value='0'>更改为顶级栏目</option>
                                        <?php
                                            if ($treelist->num_rows() > 0)
                                            {
                                                foreach ($treelist->result() as $row)
                                                {
                                                    $s_count=count(explode('-',$row->path));
                                                    $s_length='';
                                                    for($i=1;$i<$s_count;$i++)
                                                    {
                                                        $s_length=$s_length.'─';
                                                    }
                                                    $s_select='';
                                                    if($row->id==$model->pid)
                                                    {
                                                        $s_select='selected=\'selected\'';
                                                    }
                                                    echo " <option value='".$row->id."' ".$s_select.">".$s_length.$row->name."</option>";
                                                }
                                            }
                                        ?>

                                    </select>
									-->
									<?php echo $p_model==true?$p_model->name:'顶级分类';?>
                                </td>
                            </tr>
                            <tr bgcolor='#FFFFFF'>
                                <td width='25%'>子分类名称：</td>
                                <td width='75%'><input type="text" name="sortname" width="200" value="<?php echo $model->name ?>" id="sortname"/></td>
                            </tr>

                            <tr>
                                <td colspan='2' bgcolor='#F9FCEF'>
                                    <table width='270' border='0' cellpadding='0' cellspacing='0'>
                                        <tr align='center' height='28'>
                                            <td width='90'><input name='imageField1' type='image' class='np' src='<?php echo base_url();?>public/images/button_ok.gif' width='60' height='22' border='0' /></td>

                                            <td><a href='#'><img src='<?php echo base_url();?>public/images/button_back.gif' width='60' height='22' border='0' onClick='history.go(-1);return false;' /></a></td>
                                        </tr>
                                    </table>
                                </td>
                            </tr></table></form>

                </td>
            </tr>
        </table>
        <p align="center">

            <br>
            <br>
        </p>
    </body>

</html>
